﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TestApplication
{
    public class Person
    {
        private List<Person> _friends = new List<Person>();

        public string Firstname { get; set; }
        public string Lastname { get; set; }

        public List<Person> Friends { get { return _friends; } }

        public PersonManager Manager { get; set; }

        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(string.Format("[Person Name: {0} {1}, Friends: ", Firstname, Lastname));

            foreach (Person friend in _friends)
                sb.Append(friend.Firstname + ", ");

            sb.Append(string.Format("Manager: {0}]", Manager));
            
            return sb.ToString();
        }
    }
}
